using System.Collections.Generic;

namespace hao_Common.AutoMapper.Services
{
    /// <summary>
    /// 映射服务接口
    /// </summary>
    public interface IMapperService
    {
        /// <summary>
        /// 映射单个对象
        /// </summary>
        TDestination Map<TDestination>(object source);
        
        /// <summary>
        /// 映射单个对象到指定目标对象
        /// </summary>
        TDestination Map<TSource, TDestination>(TSource source);
        
        /// <summary>
        /// 映射到现有对象
        /// </summary>
        TDestination Map<TSource, TDestination>(TSource source, TDestination destination);
        
        /// <summary>
        /// 映射集合
        /// </summary>
        IEnumerable<TDestination> Map<TSource, TDestination>(IEnumerable<TSource> source);
        
        /// <summary>
        /// 映射列表
        /// </summary>
        List<TDestination> MapList<TSource, TDestination>(IEnumerable<TSource> source);
    }
}